program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, k, i, a, b, c, d: integer;

begin
  a:= 1;
  b:= 1;
  c:= 1;
  read (n, k);
  for i:= 1 to n-1 do
    a:= a*i;
  if (k>0) then
    for i:= 1 to k-1 do
      b:= b*i;
  for i:= 1 to n-k do
    c:= c*i;
  d:= round (a/b/c);
  write (d);
  readln;
  readln;
end.
 